* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #0c1b2a 0%, #0a1423 100%);
    color: #e0f0ff;
    overflow-x: hidden;
    min-height: 100vh;
    padding: 15px;
}

.dashboard-container {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto repeat(3, 1fr);
    gap: 15px;
    height: 100%;
}

/* 顶部标题样式 - 扫光效果 */
.header {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, rgba(16, 36, 62, 0.7), rgba(30, 65, 114, 0.7));
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 10px 30px rgba(0, 40, 100, 0.5);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(64, 158, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(64, 158, 255, 0.3), transparent);
    animation: sweep 4s linear infinite;
}

@keyframes sweep {
    0% { left: -100%; }
    100% { left: 150%; }
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #409eff, #64b5f6, #90caf9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(64, 158, 255, 0.5);
    position: relative;
    z-index: 2;
}

.datetime {
    font-size: 1.2rem;
    color: #a0d0ff;
    text-align: right;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.time {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #fff;
}

.week {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 卡片样式 */
.card {
    background: rgba(16, 36, 62, 0.6);
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0, 20, 60, 0.4);
    border: 1px solid rgba(64, 158, 255, 0.2);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 40, 100, 0.6);
    border-color: rgba(64, 158, 255, 0.4);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #64b5f6;
    display: flex;
    align-items: center;
}

.card-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 20px;
    background: #409eff;
    border-radius: 3px;
    margin-right: 8px;
}

/* 图表容器 */
.chart-container {
    flex: 1;
    min-height: 250px;
}

/* 滚动表格样式 */
.scroll-table {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.table-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: rgba(30, 65, 114, 0.7);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #90caf9;
    position: sticky;
    top: 0;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(64, 158, 255, 0.1);
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(30, 65, 114, 0.4);
}
/* 人次占比缩小样式 */
.visit-item.compact {
    padding: 10px 8px !important;
    font-size: 12px !important;
}

.visit-item.compact .visit-type {
    font-size: 12px !important;
}

.visit-item.compact .visit-value {
    font-size: 18px !important;
    margin: 3px 0 !important;
}

.visit-item.compact .visit-change,
.visit-item.compact .visit-proportion {
    font-size: 10px !important;
}

/* 共享表格滚动样式 */
#shared-table tbody {
    height: 160px; /* 显示4行的高度 */
    overflow: hidden;
    position: relative;
}

.scroll-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.table-content {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease; /* 平滑过渡效果 */
}

.scroll-row {
    display: flex;
    padding: 8px 5px;
    border-bottom: 1px solid rgba(58, 106, 153, 0.5);
}

.scroll-row > div {
    flex: 1;
    text-align: center;
}
/* 医疗耗材环比卡片 */
.supply-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.supply-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
}

.supply-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 8px 0;
}

.supply-label {
    font-size: 1.1rem;
    color: #a0d0ff;
}

.supply-change {
    font-size: 1rem;
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.up {
    color: #4caf50;
}

.down {
    color: #f44336;
}

/* 人次占比卡片 */
.visit-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    height: 100%;
}

.visit-item {
    background: rgba(30, 65, 114, 0.5);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.visit-item:hover {
    background: rgba(30, 65, 114, 0.8);
    transform: scale(1.02);
}

.visit-type {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.visit-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 4px 0;
}

.visit-change {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* 加载提示 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 1.1rem;
    color: #64b5f6;
}

.loading-spinner {
    border: 3px solid rgba(100, 181, 246, 0.3);
    border-radius: 50%;
    border-top: 3px solid #64b5f6;
    width: 25px;
    height: 25px;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端适配 */
@media (max-width: 1200px) {
    .dashboard-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        text-align: center;
        height: auto;
    }

    .title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .datetime {
        align-items: center;
    }
}
/* 在您现有CSS基础上添加以下规则 */
.table-container {
    position: relative;
    height: 180px; /* 固定容器高度 */
    overflow: hidden;
    border-radius: 8px;
}

#shared-table {
    width: 100%;
}

.scroll-container {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease; /* 平滑过渡效果 */
}

/* 滚动条样式 (保持与主题一致) */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(30, 65, 114, 0.3);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(64, 158, 255, 0.5);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 158, 255, 0.8);
}

/* 滚动提示样式 */
.scroll-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: linear-gradient(transparent, rgba(16, 36, 62, 0.8));
    padding: 8px 0;
    color: #64b5f6;
    font-size: 0.85rem;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
/* 在您现有CSS基础上添加以下规则 */
.table-container {
    position: relative;
    height: 180px; /* 固定容器高度 */
    overflow: hidden;
    border-radius: 8px;
}

#shared-table {
    width: 100%;
}

.scroll-container {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease; /* 平滑过渡效果 */
}

/* 滚动条样式 (保持与主题一致) */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(30, 65, 114, 0.3);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(64, 158, 255, 0.5);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 158, 255, 0.8);
}

/* 滚动提示样式 */
.scroll-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: linear-gradient(transparent, rgba(16, 36, 62, 0.8));
    padding: 8px 0;
    color: #64b5f6;
    font-size: 0.85rem;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 数据共享组件样式修复 */
.scroll-table {
    position: relative;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(16, 36, 62, 0.5);
}

/* 新添加的表头容器 */
.table-header-fixed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: rgba(30, 65, 114, 0.95);
    backdrop-filter: blur(5px);
    display: grid;
    grid-template-columns: 40% 30% 30%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(64, 158, 255, 0.3);
}

.header-col {
    font-weight: 600;
    color: #90caf9;
    font-size: 14px;
}

/* 滚动容器 */
.scroll-container {
    position: relative;
    height: 100%;
    overflow: hidden;
    padding-top: 46px; /* 为固定表头预留空间 */
}

.scroll-content {
    position: absolute;
    width: 100%;
}

.scroll-item {
    display: grid;
    grid-template-columns: 40% 30% 30%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(58, 106, 153, 0.5);
    transition: all 0.3s;
    background: rgba(16, 36, 62, 0.2);
}

.scroll-item > div {
    padding: 0 5px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.scroll-item:hover {
    background: rgba(30, 65, 114, 0.4);
}

/* 滚动控制 */
.scroll-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 30;
    background: rgba(12, 27, 42, 0.8);
    border-radius: 12px;
    padding: 5px 12px;
    font-size: 0.85rem;
    color: #64b5f6;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(2px);
}

.scroll-controls:hover {
    background: rgba(30, 65, 114, 0.9);
    box-shadow: 0 0 8px rgba(100, 181, 246, 0.5);
}

.icon {
    display: inline-block;
    margin-left: 6px;
    transition: all 0.3s;
    font-size: 0.8em;
}

.paused .icon {
    transform: rotate(90deg);
}

/* 卡片基础样式 */
.card {
    background: rgba(16, 36, 62, 0.6);
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0, 20, 60, 0.4);
    border: 1px solid rgba(64, 158, 255, 0.2);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #64b5f6;
    display: flex;
    align-items: center;
}

.card-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 20px;
    background: #409eff;
    border-radius: 3px;
    margin-right: 8px;
}